<?php

	$payment_amount = $_POST['payment_amount'];
	$payers_account = $_POST['payers_account'];
   
	//Validation of Account Number through CURL
    $ch = curl_init(); 

    // set url
    curl_setopt($ch, CURLOPT_URL, "http://176.9.51.8/eng/thirdparty/getcustomer.jsp?name={$payers_account}&loginName=agent&loginPassword=123456"); 

    //return the transfer as a string 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

    // $output contains the output string 
    $output = curl_exec($ch);

    // close curl resource to free up system resources 
    curl_close($ch);      


    //if(trim($output) == "0|11112;11112;100.0;2014/07/02;0.0;") {

    if(trim($output) == "-10007|Not found, operation failed."){
    	echo "invalid";
    }
    
    else{

    	echo "valid";
    }
?>